Monday, February 22, 2021

Distributed Hash Table in System Architecture

Distributed hash table (DHT) in system architecture?


👉    This is a system architecture model that is a combined and more complex architectural pattern compared to the C2S (Client-Server) and the P2P (Peer-to-Peer).

👉    It is a fully-decentralized mechanism.

👉    Each peer in a distributed hash table (DHT) is assigned with a key and value pair. These pairs are arranged in a manner with the closest ID's related to the immediate successor.

👉    BitTorrent can be an example where DHT can be used to increase its performance and speed of download using the application.

👉    BitTorrent clients use DHT:
                    1.    Key       =    file content hash.
                    2.    Value     =    IP address peer willing to serve file.





What is hard in Distributed hash table (DHT)?

👉     Decentralized.




👉     Scalability.

👉     Achieve efficiency.

👉     Robustness.



How is Distributed hash table (DHT) accessed?



👉    Each peer in the DHT has a peerID and it contains a predessor, successor and a shortcut.

          1.    The predessor is the peer that is situated just above the current peerID.
          2.    The successor is the peer that is situated just after the current peerID.
          3.    The shortcut is a efficient storage which DHT provides to easily access the other                                      neighbouring peers (other than the predessor and the successor).

👉   Lets consider a simple example with 4 peers.

                Peer01        Peer02          Peer03       Peer04

PeerID        001            002               003            004

        ** Lets consider the peer02

                Its successor is Peer03
                Its predessor is Peer01
                The shortcut assigned is Peer04.

👉    The shortcut that is being assigned helps to easily access the other peers in the process of complex          communication.

👉   The peers in the DHT are located in a circular manner where each peer is connected to a                         corresponding peer.




 

Thursday, February 18, 2021

Salesforce Application Creation

 👉    Salesforce Application Creation.

            *    Salesforce is a CRM (Customer Relationship Management) application that is a cloud computing service as a software (SaaS). 
            
            *    Salesforce's services allow businesses to use cloud technology to better connect with customers, partners and potential customers.

            


        *    Steps involved in a custom app creation.
                   
            1.    Go to the setup page in salesforce.
            2.    Type "App manager" in Quick find of setup page.
            3.    Click on "new" in the App manager page.
            4.    Provide the name of the App and choose icon for app, the color and visibility options.
            5.    Next select the type of app you wanted to create ( Standard or a console app).
            6.    Then select the items to be displayed in the utilities menu (chatBox, Rich Text, etc).
            7.     Select the navigation options to be displayed. (The custom and standard objects that needs                     to be displayed - Account, Lead, etc).
            8.     Click on "finish", then the application is created successfully.

 👉    Salesforce static resources & assets.

            *    Static resources are which is stored in the salesforce application that can be accessed by the logged in user or by the other force.com users if the permission is given.

            *    Assets are which is like the temporary storage in salesforce where we upload images like objects. For example, when we upload a image into App icon then its automatically uploaded into the assets section.

            *    Create a static resource :

            1.    Go to the setup page in salesforce.
            2.    Type "Static resource" in Quick find of setup page.
            3.    Click on "new" resource.
            4.    Give a label to the resource and confirm the visibility of the resource (Private or public).
            5.    Click on "finish" where the resource is uploaded.




 👉    Salesforce custom labels.

            *    Custom labels are custom text values that can be translated into any language that Salesforce supports. To access custom labels in Aura components, use the $label global value provider.

            *    Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user's native language.

            *     We are advised to write the SOQL queries inside the custom labels which helps the developers to easily edit the queries without re-writing the exact query again.

    
            Need more information on this :




             
            




Tuesday, February 16, 2021

Difference between Java & JavaScript with some hints

👍   Differences between Java and JavaScript    

Java language                             JavaScript


                   Complier based language.                                             *    Interpreter based language.
                
                *     Multithreaded.                                                               *    Single threaded.

                *     Statically typed.                                                             *    Dynamically typed.

                *    Creates application that runs on VM or                          *    Runs in the browser.
                      browser.           

                *     OOP language.                                                               *    OOP scripting language.

                *    Mainly used for back-end.                                              *    Mainly used for the front-end.

                *    Requires Java development kit(JDK)                             *    Can be written in any text                                                                                                                             editors.

                *    For various apps.                                                             *    For web apps Mainly.

                *    Allows better security.                                                     *    Need for effort to enhance                                                                                                                             security.

                *    Server side language.                                                       *    Server and client side                                                                                                                                  language.

👍  Hints in Java and JavaScript  


            *        JavaScript is a powerful and flexible programming language that is implemented                                      consistently by various web browsers. JS provides interactivity between web pages in                              an application.




               *        Why java is unique compared to other programming languages?

                               Simple
                               Robust
                               Platform in-dependence
                               Portable
                               Secure
                               Architecture neutral



                         

Introduction to S.O.L.I.D Principles

 The S.O.L.I.D principle helps to design the software based on the object oriented concepts. This helps to design a software in an efficient manner with standard development and easy debugging principles.





1. Single Responsibility Principle (S.)

👉     This principle lays out that the software designers should focus their development one at a time. This suits that one use case provided by the client should analyzed at once. 

👉     It is not a good practice to work on multiple use cases since it may lead to addition of unusual complexities and loss of any specific requirements due to multiple perspectives.

💥     An best example is a class designed to print the employee details, should only focus on printing the details not calculating the salary for the employees. 




2.Open / Close Principle (O.)

👉     This principle outlines that the designed objects should reliable for extension but not unauthorized modification.

👉     The key idea is the classes and interfaces that we create should be able to withstand new relevant extensions, but it should not accept modifications if its irrelevant and not authorized.

💥     An best example is a class designed to print the employee details, should be able to add new details to the list but not delete any important details if its used by any other classes or objects.

3.Liskov Substitution Principle (L.)

👉   This principle mainly deals with the inheritance concept. It states that you should design your classes so that client dependencies can be substituted with the subclasses without the client knowing about the change.

👉    In my words this is if the sub class implement new methods or attributes which are not relevant to its super class then the liskov substitution principle is violated.

💥     An example is a class name Shape created with an attribute called length then a base class called Rectangle is created where it changes the length to irrelevant data then LSP is violated.




4.Interface Segregation Principle (I.)

👉     This is a principle that elaborates more on the end user. The main idea is if an interface is implemented we actually implement all its methods. This can be sometimes irrelevant to the user.

👉      This means although the interface contains many abstract methods the end user should not be forced to implement all those methods.

            "This is something like, take what you need not the whole in  the basket"

💥     An example is an interface which contains methods needed by both end user and the admin, where both admin the user need to implement their own and their irrelevant methods too. This type of situation interface segregation principle is violated.

4.Dependancy Inversion (D.)

👉     Higher level modules should not depend on the lower level modules, but only for the abstraction.

👉    Here highlevel modules are which much closer to the business while lower level modules are like more technical stuffs.






    






  

Monolithic vs Microservices

👉     Monolithic Architecture. *     Monolithic architecture was there before Microservices came into action.  *     All functionalities or...