Hybrid distributed application in banking transaction using remote method invocation

,


Introduction
At this time various banks have had many branches in major cities of world.System used usually has a central database in a particular city.Application used allows for open a new savings account, handle deposits, withdrawals, transfers money between savings accounts at same bank through desktop applications and website.Prospective customers from different parts of world will access this application to submit their personal data as a condition for creating a new account at bank.This personal data must meet various bank policies, such as prospective customer must be over 18 years of age.According to Boyd et al. [1] the importance of bank selection criteria in terms of the age of the head of the household.Customers who already have account savings in bank can also transfer money between account savings at same bank.The importance of technology and speed has also been confirmed by Coyle [2] who observed "Future Bank" trade show in Minneapolis (USA) where 250 bank vendors participated.Coyle reported that the competitive bank of the future is the one which can offer speedy, technology based services (e.g.ATM, Internet) backed by an effective staff training.
Problem caused by increased database server performance due to large number of users who accessing this application should not degrade performance of application.Ideal solution of this scenario is application users access and sending information using client application.Information submitted will be validated by a component on server component.After that component on server checks whether data submitted has met bank policy, if fulfilled then server components make a connection with database server and then transmit data.
To solve above problem, we should keep database server performance optimally, the ideal solution is that application must be distributed to network.Therefore, we are going to used three-tier application [3] because three-tier applications support deployment of distributed-based applications [4] component.In distributed applications it takes a remote method call, then we are going to used Remote Method Invocation [5] to develop this system.

Research Method
This research is different from other research before because we are trying to create two different applications which are desktop and web application that are using the same methods or functions located in desktop application, so everytime we are going to changed methods or functions we do not have to work twice.We only work once to changed methods or functions in the desktop application after that both desktop and web application can used or called that methods or functions.The web application is capable to call methods or functions in desktop application through servlet.This make the development time more effective and efficient.
Earlier research [6] stated that unlike previous approaches where only application services can be invoked, Android RMI allows users to invoke system services as well as application services between devices using remote parcel format.By reducing the number of marshalling and unmarshalling steps, the time taken for remote method invocation is shortened by 148% in 4 KBytes and by up to 432% in 100 KBytes compared to distributed intent where additional marshalling and unmarshalling steps are needed.
Another earlier research [7] stated that present day's amount of computational requirements has shifted the processing of data from the regular way to parallel way of computation.Pipelined processors, array processors can be employed to construct design of parallel hardware.These systems constructed can be further extended with the help of scalar and super scalar systems.We provide an efficient way of implementing Winograd's variant of Strassen's matrix multiplication on parallel systems by making use of RMI (Remote Method Invocation) which provides us distributed object oriented programming, multithreading programming.Multithreading approach helps a lot in concurrent, dynamic and asynchronous programming.

Remote Method Invocation (RMI)
Remote Method Invocation is a specification that allows a Java Virtual Machine (JVM) [8] to call methods of that object located on another Java Virtual Machine (JVM).Both JVM's can run on a different computer or running as a separate process on same one computer.RMI is implemented in middle-tier [9] of three-tier framework architecture, this facilitates programmer to invoke distributed components over network.Sun introduced RMI as an easy to complex alternative in server-socket programming [10].In using RMI, programmer does not need to master socket or multi-threading programming [11], as needed just concentrate on developing business logic [12].
RMI distributed application has two components: RMI Server [13] and RMI Client [14].RMI Server consists of objects whose methods will called remotely.The server created some remote objects later create references from those objects in RMI Registry [15].RMI Registry is service that runs on RMI Server.Remote objects created by server then listed in this registry according to unique name of the object.Client refers one or more remote objects from RMI Registry to see name of object.Then client calls methods on remote object.Once client refers to the remote object, methods on remote object called as calling method on local object.This difference can not be identified whether method is called on remote object or called on local object in client.
RMI architecture consist of three layer: Stub/Skeleton Layer [16], Remote Reference Layer [17] and Transport Layer [18].Stub/Skeleton Layer is waiting for remote method call by client and forward it to the remote RMI Service on server.This layer consists of a Stub and a Skeleton.To call methods on remote object, request on the client side starts with Stub.Stub is a proxy on client side representing remote object.Stub is referenced as another local object by program that runs on client and provide methods of remote objects.Stub communicates method call on remote object via implementation of skeleton on server.So, Stub on client collects information consisting of: identifier of remote object to be used, description of method we will call and parameters that have been marshalled.
Skeleton is a server-side proxy that forwards communication with Stub, by reading parameters at method call, then make a call to remote service object that is implemented, receive return value, then write return value to Stub.So Skeleton on server does things below every time there is a Remote Method Invocation: unmarshals parameters, search for called object, calling desired method, catch and marshals return or exception value of calling and submitting a packet consisting of returned value marshalled to Stub on client.Remote Reference Layer interprets and manages references of client to remote object on server.This layer is present both on client and server.RRL on client side receives a request method from Stubs are sent as marshaled streams from data to RRL on server side.Marshalling [19] is a process which are parameters passed by client converted to a format that can be sent over network.RRL on server side unmarshals parameters sent to remote method through Skeleton.Unmarshaling is a process which are marshaled parameters passed by RRL on client side via RRL on server side changed to the format which is understood by Skeleton.When returning value from Skeleton, data marshaled back and communicated to client via RRL on server side.
Transport Layer is a link between RRL on server side and RRL on client side.Transport Layer is responsible for setting up new connections and setting up an existing connection.Transport Layer is also responsible for handling remote object in address space.Below are steps that explain how client connected to server: when receiving request from RRL on client side, Transport Layer create a socket connection to server via RRL on server side.Then, Transport Layer skips connection that already connect to RRL on client side and add remote reference to connection on connection table.
Based on the RMI specification, steps in developing distributed RMI application: defines remote interface class, defines and implement various remote method in server class.Defines and implement client class.Compile source files.Source files include those files contains definition of remote interface, which server class defines the implementation of remote interface and client class.Generating Stub and Skeleton.Create a security policy [20].Run RMI Remote Registry [21].Run server.Run client.
In a three-tier architecture, presentation logic is on client-side, access database is controlled by server-side, and business logic lies between two other layers.Business logic layer is also known as application server or middle-tier of component-based three-tier architecture.This type of architecture, too known as server-centric [22], because it allows application components to path on middle-tier application server then implements business rule, so it separated between presentation interface and database implementation.This component can be developed using any programming language that allows component creation.These components can be created centralized to facilitate the development, maintenance, and deployment.Because middle-tier handles business logic, workload becomes balanced between client, database server and server that handles business logic.This architecture leads to efficient data access.Problem regarding limitations of connection to database is minimized because database only view business logic layer and not whole client.Unlike in two-tier application, database connection occurs at beginning and then set as long as it is still access data, while in three-tier application database connection takes place only when data access is required and released when data is returned or sent to server.
This various advantages motivated author to use RMI in case of banking transactions.This method is considered very appropriate for banking transactions that handle large number of customers and prospective customers.Because of that reasons data access needed efficiently and minimize limitations of connections to database.

Servlet
Servlet [23] is a Java program that can be deployed on Java enabled Web server [24] to make maximum functionality of Web server.Servlet can be used to develop various web-based applications.Servlet developed using Java so we can use various advantages of Java API, this is why we can use servlet to access RMI.Therefore, author uses servlet in development of application that handle banking transactions via browser.Servlet works by client or browser to send request to server using GET or POST method.Example: servlet can be called as a result of user pressing user-interface component, such as buttons on web page form.After request processed by servlet, output is returned to client in form of html page.
Java Servlet is loaded only once in memory and initialized during init () method called.After servlet is initialized, servlet is ready to accept request from client and process request through service () method until it is stopped by the destroy () method.Service () method is called every time there is a request.Life cycle of servlet is described as we can seen in Figure 1.Table 2 illustrates some of methods used in servlet creation.[25] is a set of specifications that define standards in manufacture of distributed objects.J2EE also set up how this technology can be integrated to provide that complete solution.J2EE is also standard architecture that facilitate to multi-tiered programming model.J2EE server is used to deploy servlets and JSP [26] files allow users to access it by applying proper security.

Data Flow Diagram (DFD)
Data Flow Diagrams [27] are diagrams that describe data process along with flow in business system.We are going to make two Data Flow Diagrams.The first one is for Web Application, second one for Desktop Application.

Data Flow Diagram Web Application
The first one is Data Flow Diagram for Web Application, we can see in Figure 2. Complete explanation about this Data Flow Diagram for Web Application we can see below Figure 2.  -Customer receives report that transfer succeeded and their last balance.

Data Flow Diagram Desktop Application
The second one is Data Flow Diagram for Desktop Application, we can see in Figure 3. Complete explanation about this Data Flow Diagram for Desktop Application we can see in Figure 3. -Officer (Teller) must login to system for using all system facilities.-Officers (Teller) can perform transactions such as deposits, withdrawals and transfers, all transactions are recorded as AccountHolderTransaction Info on Bank database -System gives report that transaction has been successful or failed and last balance.

Results and Analysis
Here is the implementation of system.

Implementation of Servlet
We are using Servlet to access same method that desktop application used.In Figure 4 is web login page that call method in the firstservlet.We are using Account Server server=(Account Server)Naming.lookup ("rmi://localhost/ AccountServer"); in Figure 5 to get reference from remote object implementation.Method lookup using name that we are registered to the server as parameter.Beside that, we are calling menuservlet not because of button click but by Request Dispatcher interface.We are sharing account number attribute in Figure 6 using Servlet Context context=getServletContext(); Object obj=context.getAttribute("accountnumber");Because account number data type is integer then we need to parsed it to String so we can compared it.After that checked the session.

Desktop Application
Registration menu is menu that appears when teller input customer information for first time like in Figure 7.If registration is successful system will give output that registration is successful and inform customer account number as well as initial PIN to login via web application.A window informing you that registration was successful can be seen in Figure 8.In Figure 9 we can see login page of desktop application.Teller must insert username and password for using menus in system.

Web Application
Login web page is page that appears when customer already registration through teller (desktop application) and get PIN to login through web page like in Figure 10.In Figure 11 we can see main menu of web system.In Figure 12 we can see transfer menu of web system.

Conclusion
This paper presented a hybrid application to support both compile time and run time generation of marshallers in desktop and web application.This application can be run as separate processes on one same computer or run on different computer.For optimization and light weight communication protocol once client gets reference from remote object then method of remote object is called as calling method from local object.We have defined and implemented on remote object can we call or use both in desktop and web application so we do not need to work twice.If we are going to developed web application, we can used Servlet to call remote method that we are implemented in desktop application.This make the application development more effective and efficient.

Figure 4 .
Figure 4. Web login page

Table 1 .
supports servlet implementation through javax.servletand javax.servlet.httppackage.Interface javax.servlet.Servlet provides general framework in manufacture of servlets.Servlet can implement equally either directly or indirectly by extend class javax.servlet.GenericServlet or javax.servlet.http.HttpServlet.GenericServlet class of javax.servletpackage is used to create servlets that can work with various protocols.Package javax.servlet.htpp is used to create a HTTP servlet generate output in form of HTML pages.Class used to make HTTP servlet called HttpServlet and derived from class GenericServlet.Complete description about this HttpServlet class/interface can be seen in Table 1.Class/Interface Description Hybrid distributed application in banking transaction using remote .... (Agus Cahyo Nugroho) 2211

Table 2 .
Function Method in Servlet Creation ServletResponse.setContentType (String type)Set the type of content that is sent as a response to client.Example: setContentType ("text / html") is used to set response type as text.◼ ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 5, October 2019: 2208-2217

table . -
After becoming a bank customer, user obtains account number and Personal Identification Number (PIN) that can be used for login to system.System checks account number and On the next page user can transfer to account other customers.This transaction is recorded on Bank database Account Holder Transaction table.Then there is an adjustment (balance) both on sender's account and transfer recipient on Bank database Account Holder table.
Personal Identification Number (PIN) user to Bank database Login table, if true then user can log into system.TELKOMNIKA ISSN: 1693-6930 ◼ Hybrid distributed application in banking transaction using remote .... (Agus Cahyo Nugroho) 2213 -

table AccountHolderTransaction .
-After transaction done, made account adjustment (account balance) on Bank database Account Holder table.-All transactions that have occurred in branches are recorded at Bank database CounterTransaction table.-Lastly adjusted branch balance (counter balance) on Bank database Counter table.