Monday, December 9, 2019
Design Of Programming Language In Retail Space
Question: Discuss about theDesign Of Programming Language In Retail Space. Answer: Naming the Program Our task is to come up with a robust and effective programming language that is suitable for usage in the retail industry which has been named RAP (Retail Analytics Programming). Introduction and Purpose The purpose at hand here is to develop and design a programming language that is dovetailed to the needs of the modern retail industry which is increasingly tilting towards e-commerce and personalized product offerings. Retail giants of the world today including players like Walmart have to track, handle and efficiently use terabytes of data to engage their vast ocean of registered customer base and use them for personalized marketing purposes. Few examples of these might include customer loyalty programs, personalized offering through electronic channels and targeted promotions of specific product to improve potential of selling. From the front end and moving in the back end, e commerce and brick and mortar stores today have to handle millions of SKUs and ensure efficient inventory management so that the correct product is always available at the correct place. Doing so without hugely increasing inventory handling cost involves extremely efficient inventory management techniques cou pled with continuous analysis and change in terms of shelf availability of the SKUs. The goal, therefore is to arrive at the optimal amount and quantities of SKUs so as to draw that balance between increasing holding cost and loss of sales opportunity due to unavailability of the product.This is the problem of ordering and positioning retailer inventory at warehouses and stores in order to meet customer demands while simultaneously minimizing storage and transportation costsThis problem can also be viewed as a simple example from the broad class of multi echelon inventory control problems that has received significant attention in the field of supply chain management. (Roy, Bertsekas, Lee, Tsitsiklis, 2003) Retail data analytics therefore deals with Big Data and efficient mining techniques to ensure personalized service to the individual customer while keeping the cost to an optimal level and such should be the capabilities of the program we develop. For obvious reasons of speed and volume of data to be handled, the choice for the programming language should be that of a mixture of compiled and interpreted type rather than an interpreted type. Compilation Method Used Compilers consider programs written by using a source language, such as C, C++, Java, and so on, to generate their semantically equivalent representations by targeting a destination language, such as the machine code of a target platform. (Campanoni, 2011) We propose a method of compilation into bytecode, followed by execution by a software interpreter. Also known as the p-code, it will act as a JIT or a Just-In-Time compiler, translating the bytecode into machine language immediately at runtime. As compared to a method of direct execution of the source code, such a method gives advantage in terms of execution speed with the drawback of introduction of a slight delay before the program is run, during compilation from bytecode to the native machine code. However, such an approach keeps portability of the bytecode intact, whilst keeping the virtual machine to be hardware specific. We can further consider a two phase execution, wherein the source code is initially converted into a bytecode which is further passed on to the virtual machine for storage. Memory Management and Scoping Features By default, the volume handled by the retail giants worldwide makes it a mandate to opt for smooth memory management features so as to be comfortable with the voluminous data to be handled and the speed at which it has to be processed and executed in real time to achieve the requisite levels of service delivery. While choosing between a manual and automatic memory management feature, the nature and type of data to be handled in the particular industry comes in useful. Considering the volume and complexity, an automated memory management is desirable and is the one we are opting for. A scope based memory management or SBMM system can make a program more deterministic but is not widely used in todays world leaving C or C++ for the reason of speed of execution and the volume of memory to be handled. Therefore we go for a Java-like Garbage Collection (GC) model of memory allocation to go with RAP. Implementation and an optimal environment are therefore crucial to the efficient performance of a GC model. Our proposition is to go for a STACK BASED MEMORY ALLOCATION model in which addition or removal of data is carried out typically in a LIFO (Last In First Out) manner. Simple and typically faster than the traditional heaping technique, it provides the added advantage that memory reclamation is much simpler when function exit is done, which is extremely convenient to the programmer if the data is no longer needed. Language Features In this section, we will discuss the features that have been selected for the design and development of the proposed programming language with respect to the Simplicity, Orthogonality, Data types, Syntax design, Support for abstraction, Expressivity, Type checking, Exception handling, and Restricted aliasing. Simplicity: In the world of information technology, simplicity is a feature that is often required by both operators and engineers, however, as users regularly attest, it is not always found. In software design, a graceful solution is sometimes one that reports a need with surprising simplicity and efficiency. Thus for the creation of an efficient interface, simplicity is of the primary importance.The most popular metrics for gauging the complexity (or simplicity, if simplicity is taken to be the opposite of complexity) are McCabe's Cyclomatic Complexity and the Halstead Complexity Metrics. We target a low cyclomatic complexity so as to limit the number of paths through the module, This would come in handy while testing the program which would require lesser number of runs so as to check the various paths through the system Orthogonality: Related somewhat to simplicity, orthogonality in a language is a measure of the number of components which can further be combined to get the requisite results. More thorthogonality of the language, the lesser are the number of exceptions. For the language RAP as described for the retail industry, we will go with a relatively high orthogonality so as to limit the number of exceptions arising in the system. Symmetry and consistency should be the parameters to keep in mind while designing the language to be executed in a complex system with voluminous transactions to endow the necessary stability and ease of usage Data types: It refers to a collection of data which contains values whose characteristics are in-built into the system. For the retail industry which is largely transactional and number oriented, integers, characters and real numbers play the most important role and should be well defined within the scope. Integers, Booleans, characters, floating point decimals and alphanumeric strings would compose the data type for RAP Syntax Design: Syntax in any language is the predefined set of symbol combinations that are considered to be valid and applicable in a correctly structured program fragment. We will opt for a Java type syntax for RAP where all codes would belong to classes and all values are necessarily objects Support for abstraction: Abstraction would be achieved by using abstract classes in addition to interfaces. Instantiation of the abstract class is not permitted and an abstract class must be inherited from another. For abstraction of methods, the method must be declared as abstract even if the class within which it is determined is normal. However, the class containing the method will have to be defined as an abstract class. By using abstraction, we can separate the things that can be grouped to another type. Frequently changing properties and methods can be grouped to a separate type so that the main type need not undergo changes. This adds strength to the OOAD principle -"Code should be open for Extension but closed for Modification". It further simplifies the representation of the domain models. Expressivity: In the world of coding, expressivity may be defined as the width of ideas that are ideally representable and communicable within the scope of the particular language. A useful metric for determining the expressive power of a programming language is the Chromsky Hierarchy. Expressive power should be decided on while keeping in mind its effect on query evaluation with suitable efficiency within the database. Given the volume of operation of the retail industry, very high expressivity would not be permissible for efficient functioning. Type Checking: A very sophisticated type checking mechanism operates at very high efficiency but is taxing in part of the programmer to cause the program to compile and execute. In a high volume fast paced industry like retail, we wont opt for a very high degree of type checking, limiting it optimally between high sophistication and dependently typed languages. However, errors shouldnt be neglected while compiling as it would lead to bugs only at runtime which is not acceptable for any service industry dealing with end consumers. Exception Handling: Anomalous or exceptional conditions that potentially alter the normal flow of program execution are normally monitored and controlled by exception handling feature of a program. In our concerned industry which is retail, sheer numbers and types of SKUs mandate the presence of a proper and efficient exception handling feature so as to minimize compiling or run-time errors. Exception handling features in RAP would be very well defined so as to minimize the number and type of both checked and unchecked exceptions that may arise during execution or compilation. Restricted Aliasing: Aliasing refers to the method of referring to the same memory location by using several different alias names. It also adds constraint on the programming execution order. From the purview of the industry of operation, aliasing should be restricted as complex programs will be run from different locations hitting the same central database. Improper restriction of aliasing would cause a severe impact on the performance and efficiency of execution. Readability, Writability and Reliability: We define readability as a human judgment of how easy a text is to understand. The readability of a program is related to its maintainability, and is thus a key factor in overall software quality. (Buse Weimer, 2008) Overall, depending on the complexity of the industry and the expected volume of operations, RAP would have to be a highly reliable programming language with fairly acceptable readability and writability to be usable by a wide range of programmers and across various interfaces. If reliability is compromised, the system will not only perform below expectations, but it will also become much more costly across its lifetime. (Kulkarni, D, Nagarajan, L, 2006) Given the chosen features as applied in our programming language RAP, we have opted for low complexity and high orthogonality which makes our program moderately simple. Further, data types have been restricted mostly to real numbers, integers, Booleans, characters and strings so as to minimize complexity in that regard and improve the readability. Basically all our design features are recommended keeping in mind the nature of the industry and the type of data to be handled. Reduction in number of exceptions as well as a reliable and smooth operation is the need of the hour in the growing retail space. This is coupled with increased size of data banks of major corporations and more efficient mining techniques. Runtime errors would be very difficult to accommodate within such volumes and would cause serious hassle with very less time to recuperate between transactions. Our aim is for RAP to become a fairly adaptable and simplistic language with additional features of exception handling and reliability. Type of operations and data handled would be limited, but it should be able to cope up with the huge volumes requisite for the industry demand. Bibliography Buse, R. P., Weimer, W. (2008). Learning a Metric for Code Readability. ISSTA. Campanoni, S. (2011). Guide to ILDJIT. SpringerBriefs in Computer Science. Kroese, F. M., Evers, C., Adriaanse, M. A., Ridder, D. T. (2016). Bedtime procrastination:A self-regulation perspectiveon on sleep insufficiency in the General Population. Journal of Health Psychology. Kulkarni, P., D, K. H., Nagarajan, S., L, G. D. (2006). Programming Languages: A Comparative Study . Mateo, J. C., Diaz-Morales, J. F., Barreno, C. E., Prieto, P. D., Randler, C. (2012). Morningness-eveningness and sleep habits among adolescents:Age and gender differences. Psicothema. Milfont, T. L., Schwarzenthal, M. (2014). Explaining why larks are future-oriented and owls are present-oriented: Self-control mediates the chronotypetime perspective relationships. Chronobiology International. Randler, C. (2008). Morningness-Eveningness, sleep-wake variables and big five personality factors. Elsevier. Roy, B. V., Bertsekas, D. P., Lee, Y., Tsitsiklis, J. N. (2003). Laboratory for Information and Decision Systems, MIT.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.