architecture

What is service-oriented architecture?

倾然丶 夕夏残阳落幕 提交于 2019-12-31 09:45:21
问题 What is service-oriented architecture? 回答1: SOA is way to develop service oriented applications and WCF is technology which can be used to develop service oriented applications. BUT SOA defines strict rules (known as SOA tenets) for applications. If you don't follow these rules you are building services but these services do not conform to SOA. WCF allows you to develop plenty of types of services. You can develop interoperable SOAP services which conform to SOA or which doesn't. You can

What is the technology behind wechat, whatsapp and other messenger apps? [closed]

醉酒当歌 提交于 2019-12-31 08:04:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I am eager to know about the architecture of different real-time messenger apps. Are they using any generic protocol/architecture? 回答1: The WhatsApp Architecture Facebook Bought For $19 Billion explains the architecture involved in design of whatsapp. Here is the general

Application-wide request hooks in Flask. How to implement?

萝らか妹 提交于 2019-12-31 05:36:09
问题 Is it ok to define a shared request hook inside the application factory? def create_app(config_name): app = Flask(__name__) app.config.from_object(config[config_name]) db.init_app(app) csrf.init_app(app) login_manager.init_app(app) babel.init_app(app) @app.before_request def before_request_callback(): if request.view_args and 'locale' in request.view_args: if request.view_args['locale'] not in app.config['SUPPORTED_LOCALES']: return abort(404) g.locale = request.view_args['locale'] request

An object that securely provides both public API (read-only) and private API (read-write)

放肆的年华 提交于 2019-12-31 05:31:07
问题 This is an architecture problem. Programmers encounter this encapsulation problem quite often, but I haven't yet seen a complete and clean solution. Related questions: readonly class design when a non-readonly class is already in place Controlling read/write access to fields Normally, in OOP paradigm, objects store their data in fields. The class' own methods have full access to its fields. When you need to return value, you just return a copy of the data, so that the outside code cannot

Finding out system RAM via Java

蹲街弑〆低调 提交于 2019-12-31 03:25:31
问题 I am writing a program in which i need to do a minimum system RAM validation. How do i go about calculating the RAM of the machine that is executing the code in its JVM ? 回答1: I think it is not possible with pure java at all. Within the JVM you can only mesure the JVM-ram not the System RAM. http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/management/MemoryMXBean.html You'll need a piece of native code. 回答2: You can have a look into Runtime class: Runtime.getRuntime().maxMemory(); but

dll load errors in python executable made from pywin32

别等时光非礼了梦想. 提交于 2019-12-31 02:50:15
问题 I created python executables with py2exe with both 64bit python interpreter and 32 bit python interpreter. In my program, I use the module pywin32 com , and so I dl'ed and installed both the 64bit and 32bit versions of the program prior to creating the executable. The 64bit exe works fine, but the 32 bit one has the following problem: Traceback (most recent call last): File "program.py", line 11, in <module> File "win32com\__init__.pyc", line 5, in <module> File "win32api.pyc", line 12, in

A way to encapsulte ( add privacy ) to models in the MVC?

泄露秘密 提交于 2019-12-31 02:04:48
问题 I namespace my models and a single controller like this: var MC = {}; and then added properties as needed. For example, the code that initializes all my models looks like this: MC.initAll = function() { MC.MASettings.init(); MC.MATweet.init(); MC.MUserTry.init(); MC.MUserNew.init(); MC.MUserExist.init(); Su.UserOut.init(); Su.Media.init(); } I plan on changing this to a loop...just loop through MC, and if init() exists execute it. The only thing that bothers me about this architecture is

A way to encapsulte ( add privacy ) to models in the MVC?

。_饼干妹妹 提交于 2019-12-31 02:04:09
问题 I namespace my models and a single controller like this: var MC = {}; and then added properties as needed. For example, the code that initializes all my models looks like this: MC.initAll = function() { MC.MASettings.init(); MC.MATweet.init(); MC.MUserTry.init(); MC.MUserNew.init(); MC.MUserExist.init(); Su.UserOut.init(); Su.Media.init(); } I plan on changing this to a loop...just loop through MC, and if init() exists execute it. The only thing that bothers me about this architecture is

What is a good architecture for a server service and gui?

末鹿安然 提交于 2019-12-30 12:14:15
问题 I am building an app that allows users to execute some commands on a computer by sending them through email. The server will monitor (pull) one or more email accounts and start a communication session. Some authentication is also involved. I am using the latest and greatest .net technologies. I am thinking to expose the server as a service but then I cannot have a GUI to allow the user to configure things like passwords and email accounts. How can I separate these? And second, the commands

Why do Computers use Hex Number System at assembly language?

∥☆過路亽.° 提交于 2019-12-30 07:51:27
问题 Why do computer use Hex Number System at assembly language? Why don't they use any other number system like binary, octal, decimal? What thing forced computer designer to use hex system at assembly? Why it looked so beneficial to them? 回答1: Well it doesn't make a difference how you represent them but as we know that humans don't understand binary numbers, they are only to make the computer's life easier as it works on only two states true and false. So in order to make binary numbers