Search Results

Search found 9462 results on 379 pages for 'three tier'.

Page 2/379 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to do a 3-tier using PHP [closed]

    - by Ric
    I have a requirement from a client for my PHP Web application to be 3-tier. For example, I would have a web server on Apache in the DMZ, but it should NOT contain any DB connections. It should connect to a Middle server that would host the business objects but be behind the firewall. Then those objects connect to my SQL cluster on another server. I have actually done this using .NET, but I am not sure how to setup my stack using PHP. I suppose I could have my UI front tier call the middle tier using REST based web services if I create my middle tier as a second web server, but this seems overly complex. The main reason for this is advanced security: we can not have any passwords on the DMZ first tier web server. The second reason is scalability - to have multiple server on different tiers that can handle the requests. The Last reason is for deployment - it is easier if I can take one set of servers offline for testing before putting them back in production. Is there a open source project that shows how to do this? The only example I can find is the web server hosting files from a shared drive on another machine (kind of how DotNetNuke pretends to be 3-tier), but that is NOT secure.

    Read the article

  • How to handle server failure in an n-tier architecture?

    - by andy
    Imagine I have an n-tier architecture in an auto-scaled cloud environment with say: a load balancer in a failover pair reverse proxy tier web app tier db tier Each tier needs to connect to the instances in the tier below. What are the standard ways of connecting tiers to make them resilient to failure of nodes in each tier? i.e. how does each tier get the IP addresses of each node in the tier below? For example if all reverse proxies should route traffic to all web app nodes, how could they be set up so that they don't send traffic to dead web app nodes, and so that when new web app nodes are brought online they can send traffic to it? I could run an agent that would update all the configs to all the nodes, but it seems inefficient. I could put an LB pair between each tier, so the tier above only needs to connect to the load balancers, but how do I handle the problem of the LBs dying? This just seems to shunt the problem of tier A needing to know the IPs of all nodes in tier B, to all nodes in tier A needing to know the IPs of all LBs between tiers A and B. For some applications, they can implement retry logic if they contact a node in the tier below that doesn't respond, but is there any way that some middleware could direct traffic to only live nodes in the following tier? If I was hosting on AWS I could use an ELB between tiers, but I want to know how I could achieve the same functionality myself. I've read (briefly) about heartbeat and keepalived - are these relevant here? What are the virtual IPs they talk about and how are they managed? Are there still single points of failure using them?

    Read the article

  • Alternate three and three rows in a table with jQuery

    - by Frode Lillerud
    I want to set the alternate background color for rows in a table - but the twist is that I don't want every other row to be colored, I want to treat them in blocks of three rows. So for a table with eight rows I want the first three to be white, then the next three to have a background color, and the last two are back to white again. How can I do this using jQuery?

    Read the article

  • Middle tier language for interfacing C/C++ with db and web app

    - by ggkmath
    I have a web application requiring a middle-tier language to communicate between an oracle database and math routines on a Linux server and a flex-based application on a client. I'm not a software expert, and need recommendations for which language to use for the middle-tier. The math routines are currently in Matlab but will be ported to C (or C++) as shared libraries. Thus, by default there's some C or C++ communication necessary. These routines rely on FFTW (www.fftw.org), which is called directly from C or C++ (thus, I don't see re-writing these routines in another language). The middle tier must manage traffic between the client, the math routines, and the Oracle database. The client will trigger the math routines aynchronously, and the results saved in the db and transferred back to the client, etc. The middle-tier will also need to authenticate user accounts/passwords, and send out various administrative emails. Originally I thought PhP the obvious choice, but interfacing asychronously multiple clients with the C or C++ routines doesn't seem straightforward. Then I thought, why not just keep the whole middle tier in C or C++, but I'm not sure if this is done in the industry (C or C++ doesn't seem as web-friendly as other languages). There's always Jave + JNI, but maybe that introduces other complications (not sure). Any feedback appreciated.

    Read the article

  • how do I add a texture to a triangle in three.js?

    - by Kae Verens
    I've created a scene which has many cubes, spheres, etc, in it, and have been able to apply textures to those primitives, but when I want to add a texture to a simple triangle, I'm totally lost. Here's the closest I've come to getting it right: var texture=THREE.ImageUtils.loadTexture('/f/3d-images/texture-steel.jpg'); var materialDecalRoof=new THREE.MeshBasicMaterial( { 'map': texture, 'wireframe': false, 'overdraw': true } ); var geometry = new THREE.Geometry(); geometry.vertices.push(new THREE.Vector3(tentX/2+1, tentY, tentZ/2+1)); geometry.vertices.push(new THREE.Vector3(0, tentT, 0)); geometry.vertices.push(new THREE.Vector3(0, tentT, 0)); geometry.vertices.push(new THREE.Vector3(-tentX/2-1, tentY, tentZ/2+1)); geometry.faces.push(new THREE.Face4(0, 1, 2, 3)); geometry.faceVertexUvs[0].push([ new THREE.UV(0, 0), new THREE.UV(0, 0), new THREE.UV(0, 0), new THREE.UV(0, 0) ]); geometry.computeFaceNormals(); geometry.computeCentroids(); geometry.computeVertexNormals(); var mesh= new THREE.Mesh( geometry, materialDecalRoof); scene.add(mesh); This does not work. All i get is a flickering triangle (when the scene is moved) where an image should be. To test this, go to https://www.poptents.eu/3dFrame.php, upload an image in the Roof section, and drag the view to see the roof flicker. Does anyone know what I'm doing wrong here?

    Read the article

  • Systems design question: DB connection management in load-balanced n-tier

    - by aoven
    I'm wondering about the best approach to designing a DB connection manager for a load-balanced n-tier system. Classic n-tier looks like this: Client -> BusinessServer -> DBServer A load-balancing solution as I see it would then look like this: +--> ... +--+ +--> BusinessServer +--+--> SessionServer --+ Client -> Gateway --+--> BusinessServer +--| +--> DBServer +--> BusinessServer +--+--------------------+ +--> ... +--+ As pictured, the business server component is being load-balanced via multiple instances, and a hardware gateway is distributing the load among them. Session server probably needs to be situated outside the load-balancing array, because it manages state, which mustn't be duplicated. Barring any major errors in design so far, what is the best way to implement DB connection management? I've come up with a couple of options, but there may be others I'm not aware of: Introduce a new Broker component between the DBServer and the other components and let it handle the DB connections. The upside is that all the connections can be managed from a single point, which is very convenient. The downside is that now there is an additional "single point of failure" in the system. Other components must go through it for every request that involves DB in some way, which also makes this a bottleneck. Move the DB connection management into BusinessServer and SessionServer components and let each handle its own DB connections. The upside is that there is no additional "single point of failure" or bottleneck components. The downside is that there is also no control over possible conflicts and deadlocks apart from what DBServer itself can provide. What else can be done? FWIW: Technology is .NET, but none of the vendor-specific stacks are used (e.g. no WCF, MSMQ or the like).

    Read the article

  • mouse to Three.js world coordinates during TrackballControls

    - by PanChan
    I know there are a lot of answers how to translate the mouse coordinates to the Three.js world coordinates (I prefere this one). But I have troubles on calculating when using TrackballControls. First what I expect to do: I want to add a zoom function to my scene. Not by the mouse wheel, the user should be able to draw a rectangular and by lifting the mouse button, the camera is zooming on this rectangular. I've implemented all and it works, but only when the user didn't rotate/zoom/pan with TrackballControls! If the camera was manipulated, I get wrong coordinates for my drawn rectangular. I really can't figure out why... I only know that it's an issue with TrackballControls, because without them, it works. Does anyone see my mistake? I'm sitting here for two days now and can't find it.... :( var onZoomPlaneMouseDown = function(event){ event.preventDefault(); var plane = document.getElementById("zoomPlane"); var innerPlane = document.getElementById("innerZoomPlane"); var mouseButton = event.keyCode || event.which; mouse.x = ( event.clientX / WIDTH ) * 2 - 1; mouse.y = - ( event.clientY / HEIGHT ) * 2 + 1; if(mouseButton === 1){ var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 ); projector.unprojectVector( vector, camera ); var dir = vector.sub( camera.position ).normalize(); var distance = - camera.position.z / dir.z; zoomPlaneUpperCorner = camera.position.clone().add( dir.multiplyScalar( distance ) ); innerPlane.style.display = "block"; innerPlane.style.top = event.clientY + "px"; innerPlane.style.left = event.clientX + "px"; } if(mouseButton === 3){ plane.style.display = "none"; innerPlane.style.display = "none"; } }; var onZoomPlaneMouseUp = function(event){ event.preventDefault(); var plane = document.getElementById("zoomPlane"); var innerPlane = document.getElementById("innerZoomPlane"); var mouseButton = event.keyCode || event.which; mouse.x = ( event.clientX / WIDTH ) * 2 - 1; mouse.y = - ( event.clientY / HEIGHT ) * 2 + 1; var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 ); projector.unprojectVector( vector, camera ); var dir = vector.sub( camera.position ).normalize(); var distance = - camera.position.z / dir.z; zoomPlaneLowerCorner = camera.position.clone().add( dir.multiplyScalar( distance ) ); if(mouseButton === 1){ plane.style.display = "none"; innerPlane.style.display = "none"; var center = new THREE.Vector3(); center.subVectors(zoomPlaneLowerCorner, zoomPlaneUpperCorner); center.multiplyScalar( 0.5 ); center.add(zoomPlaneUpperCorner); var rayDir = new THREE.Vector3(); rayDir.subVectors(center, camera.position ).normalize(); controls.target = center; var height = zoomPlaneUpperCorner.y - zoomPlaneLowerCorner.y; var distanceToCenter = camera.position.distanceTo(center); var minDist = (height / 2) / (Math.tan((camera.fov/2)*Math.PI/180)); camera.translateOnAxis(rayDir, (distanceToCenter - minDist)); } };

    Read the article

  • 3 tier with ASP.NET, C# and Oracle 11g

    - by ephraim
    Hi I am new to .NET, want to follow N-tier approach using Visual Studio 2010(ASP.NET MVC + C#),IIS and Oracle 11g(installed on the remote linux machine). I need to have Presentation, Business Logic, Data Access and Data Tiers. Can anyone give me site/example application with the following fuctionality: insert, retrieve, delete and update/modify data in the database. A step by step guide will be highly appreciated. Thank you in advance

    Read the article

  • Three.js: texture to datatexture

    - by Alessandro Pezzato
    I'm trying to implement a delayed webcam viewer in javascript, using Three.js for WebGL capabilities. I need to store frames grabbed from webcam, so they can be shown after some time (some milliseconds to some seconds). I'm able to do this without Three.js, using canvas and getImageData(). You can find an example on jsfidle. I'm trying to find a way to do this without canvas, but using Three.js Texture or DataTexture object. Here an example of what I'm trying. The problem is that I cannot find how to copy the image from a Texture (image is of type HTMLVideoElement) to another. In rotateFrames() function the older frame should be lost and newer should replace, like in a FIFO. But the line frames[i].image = frames[i + 1].image; is just copying the reference, not the texture data. I guess DataTexture should do this, but I'm not able to get a DataTexture out of a Texture or HTMLVideoElement. Any idea?

    Read the article

  • 3-tier architecture v. 3-server architecture

    - by kawai
    I'm building a traditional .NET MVC site, so I've got a natural 3-tier software architecture setup (presentation in the form of Views, business layer in the controller, and data layer in the models and data access layer). When I've deployed such sites, it usually goes either on one server (where the web site and db live), or two servers (a web server and a separate db server). How does one go about a 3-server architecture (WEB, APP, and DB)? Would the web server just have the presentation (e.g. the physical View/aspx pages), the app server would hold the config file and bin folder, and the db server would remain as is? My question is essentially, can you simply move the /bin and all app logic onto a separate server from the presentation views? If so, how do you configure the servers to know where to look? If there's a good primer somewhere or someone can give me the lowdown, I'd be forever indebted.

    Read the article

  • ASP.Net MVC and N-Tier

    - by Damien
    Greetings, Apologies in advance that I have not researched this toughly enough to answer the question myself, but I imagine it would take me some time and I would rather know now before I invest more time in learning it. I couldn't find anything in my initial research.. Why use ASP.Net MVC if your already using a multi-tier architecture (Data Layer, Logic Layer, Presentation Layer)? Other than the fact the controller has more power than the logic layer. Am I right in thinking I can use nHibernate and all my data access classes, entities, and mappings in the Model part of the MVC? When using controllers, is it best to separate a lot of the logic into a separate class so I can call it from multiple controllers? Or can I call them from the controllers themselves, considering the fact that I would not want all of them to be Actions, just normal methods. Thanks

    Read the article

  • Of Models / Entities and N-tier applications

    - by Jonn
    I've only discovered a month ago the folly of directly accessing entities / models from the data access layer of an n-tier app. After reading about ViewModels while studying ASP.NET MVC, I've come to understand that to make a truly extensible application the model that the UI layer interacts with must be different from the one that the Data Access layer has access to. But what about the Business layer? Should I have a different set of models for my business layer as well? For true separation of concern, should I have a specific set of models that are relevant only to my business layer so as not to mess around with any entities (possibly generated by for example, the entity framework, or EJB) in the DAL or would that be overkill?

    Read the article

  • 3-Tier architecture-layering and the term-mishmash

    - by Rookian
    Hi! I am confused about the different possibilities to express a 3-Tier architecture. Data-Access-Layer Business-Layer Presentation Layer (User Interface) or Database (aka Backend) Business-Layer Presentation Layer (User Interface) Why can you skip the database in the 1st approach? Both use a database! Does the database belong to the layering or not?! What is wrong and what is right? Can someone of you clarify this :)? Thanks in advance!

    Read the article

  • General N-Tier Architecture Question

    - by whatispunk
    In an N-Tier app you're supposed to have a business logic layer and a data access layer. Is it bad to simply have two assemblies: BusinessLogicLayer.dll and DataAccessLayer.dll to handle all this logic? How do you actually represent these layers. It seems silly, the way I've seen it, to have a BusinessLogic class library containing classes like: CustomerBusinessLogic.cs, OrderBusinessLogic.cs, etc. each calling their appropriately named cousin in the DataAccessLayer class library, i.e. CustomerDataAccess.cs, OrderDataAccess.cs. I want to create a web app using MVP and it doesn't seem so cut and dry as this. There are lots of opinions about where the business logic is supposed to be put in MVP and I'm not sure I've found a really great answer yet. I want this project to be easily testable, and I am trying to adhere to TDD methodologies as best I can. I intend to use MSTest and Rhino Mocks for testing. I was thinking of something like the following for my architecture: I'd use LINQ-To-SQL to talk to the database. WCF services to define data contract interfaces for the business logic layer. Then use MVP with ASP.NET Forms for the UI/BLL. Now, this isn't the start of this project, most of the LINQ stuff is already done, so its stuck. The WCF service would replace the existing DataAccessLayer assembly and the UI/BLL would replace the BusinessLogicLayer assembly etc. This sort of makes sense in my head, but its getting really late. Anyone that's traveled down this path have any guidance? Good links? Warnings? Thanks!

    Read the article

  • Validation in n-tier asp.net mvc applications

    - by sTodorov
    Dear Stack Overflow gurus, I am looking for some practical/theoretical information regarding best practices for validation in asp.net mvc n-tier applications. I am working on a .Net application divided into the following layers: UI - Mvc3 BLL layer - all business rules. Decoupled from data access and UI layers through interfaces DAL layer - Data access with the repository pattern, EF4 and pocos Now, I am looking for a nice, clean and transparent way to specify my validation rules. Here are some thoughts on the matter so far: UI validation should only be responsible for user input and its validity. BLL validation should be handling the validity of the data regarding the application business rules. My main concern is how to bind the BLL and UI validation in the most efficient way. One think I am would like to avoid is having the UI check in a collection of validation and adding manually errors to the ModelState. Furthermore, I do not want to pass the ModelState to the BLL to be populated in there. I will appreciate any thoughts on the matter. P.S. Should this question be marked as a discussion ?

    Read the article

  • 3 tier application pattern suggestion

    - by Maxim Gershkovich
    I have attempted to make my first 3 tier application. In the process I have run into one problem I am yet to find an optimal solution for. Basically all my objects use an IFillable interface which forces the implementation of a sub as follows Public Sub Fill(ByVal Datareader As Data.IDataReader) Implements IFillable.Fill This sub then expects the Ids from the datareader will be identical to the properties of the object as such. Me.m_StockID = Datareader.GetGuid(Datareader.GetOrdinal("StockID")) In the end I end up with a datalayer that looks something like this. Public Shared Function GetStockByID(ByVal ConnectionString As String, ByVal StockID As Guid) As Stock Dim res As New Stock Using sqlConn As New SqlConnection(ConnectionString) sqlConn.Open() res.Fill(StockDataLayer.GetStockByIDQuery(sqlConn, StockID)) End Using Return res End Function Mostly this pattern seems to make sense. However my problem is, lets say I want to implement a property for Stock called StockBarcodeList. Under the above mentioned pattern any way I implement this property I will need to pass a connectionstring to it which obviously breaks my attempt at layer separation. Does anyone have any suggestions on how I might be able to solve this problem or am I going about this the completely wrong way? Does anyone have any suggestions on how I might improve my implementation? Please note however I am deliberately trying to avoid using the dataset in any form.

    Read the article

  • Entity and N-Tier architecture in C#

    - by acadia
    Hello, I have three tables as shown below Emp ---- empID int empName deptID empDetails ----------- empDetailsID int empID int empDocuments -------------- docID empID docName docType I am creating a entity class so that I can use n-tier architecture to do database transactions etc in C#. I started creating class for the same as shown below using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace employee { class emp { private int empID; private string empName; private int deptID; public int EmpID { get; set; } public string EmpName { get; set; } public int deptID { get; set; } } } My question is as empDetails and empDocuments are related to emp by empID. How do I have those in my emp class. I would appreciate if you can direct me to an example. Thanks

    Read the article

  • Multiple .obj Models in THREE.js and detecting clicked objects

    - by ZedBee
    I have been following along this example to load .obj Model using three.js. Since I needed more than one model to load so I tried this loader.addEventListener( 'load', function ( event ) { var object = event.content; object.position.y = - 80; scene.add( object ); }); loader.load( 'obj/model1.obj' ); loader.load( 'obj/model2.obj' ); First: I don't know whether this is the right approach or not since I searched but didn't find any tutorial loading more than one .obj models. Second: I want to be able to click different models on the screen. I tried this which doest not seem to work for me. Any suggestions on this?

    Read the article

  • Chapter 3: Data-Tier Applications

    With the release of Microsoft SQL Server 2008 R2, the SQL Server Manageability team addressed these struggles by introducing support for data-tier applications to help streamline the deployment, management, and upgrade of database applications. A data tier application, also referred to as a DAC, is a single unit of deployment that contains all the elements used by an application, such as the database application schema, instance level objects, associated database objects, files and scripts, and even a manifest defining the organization’s deployment requirements.

    Read the article

  • N-Tier Architecture - Structure with multiple projects in VB.NET

    - by focus.nz
    I would like some advice on the best approach to use in the following situation... I will have a Windows Application and a Web Application (presentation layers), these will both access a common business layer. The business layer will look at a configuration file to find the name of the dll (data layer) which it will create a reference to at runtime (is this the best approach?). The reason for creating the reference at runtime to the data access layer is because the application will interface with a different 3rd party accounting system depending on what the client is using. So I would have a separate data access layer to support each accounting system. These could be separate setup projects, each client would use one or the other, they wouldn't need to switch between the two. Projects: MyCompany.Common.dll - Contains interfaces, all other projects have a reference to this one. MyCompany.Windows.dll - Windows Forms Project, references MyCompany.Business.dll MyCompany.Web.dll - Website project, references MyCompany.Business.dll MyCompany.Busniess.dll - Business Layer, references MyCompany.Data.* (at runtime) MyCompany.Data.AccountingSys1.dll - Data layer for accounting system 1 MyCompany.Data.AccountingSys2.dll - Data layer for accounting system 2 The project MyCompany.Common.dll would contain all the interfaces, each other project would have a reference to this one. Public Interface ICompany ReadOnly Property Id() as Integer Property Name() as String Sub Save() End Interface Public Interface ICompanyFactory Function CreateCompany() as ICompany End Interface The project MyCompany.Data.AccountingSys1.dll and MyCompany.Data.AccountingSys2.dll would contain the classes like the following: Public Class Company Implements ICompany Protected _id As Integer Protected _name As String Public ReadOnly Property Id As Integer Implements MyCompany.Common.ICompany.Id Get Return _id End Get End Property Public Property Name As String Implements MyCompany.Common.ICompany.Name Get Return _name End Get Set(ByVal value as String) _name = value End Set End Property Public Sub Save() Implements MyCompany.Common.ICompany.Save Throw New NotImplementedException() End Sub End Class Public Class CompanyFactory Implements ICompanyFactory Public Function CreateCompany() As ICompany Implements MyCompany.Common.ICompanyFactory.CreateCompany Return New Company() End Function End Class The project MyCompany.Business.dll would provide the business rules and retrieve data form the data layer: Public Class Companies Public Shared Function CreateCompany() As ICompany Dim factory as New MyCompany.Data.CompanyFactory Return factory.CreateCompany() End Function End Class Any opinions/suggestions would be greatly appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >